package org.wabson.alfresco.translations;

public class JetS3tJarLoaderFactory implements BundleLoaderFactory
{

    private String awsAccessKey;
    
    private String awsSecretKey;
    
    private String bucketName;
    
    private String jarPrefix;

    @Override
    public JarBundleLoader createLoader(String id, String basePath) throws BundleLoadingException
    {
        JetS3TJarLoader loader = new JetS3TJarLoader(jarPrefix + id, basePath);
        loader.setAwsAccessKey(awsAccessKey);
        loader.setAwsSecretKey(awsSecretKey);
        loader.setBucketName(bucketName);
        loader.init();
        return loader;
    }

    public String getAwsAccessKey()
    {
        return awsAccessKey;
    }

    public void setAwsAccessKey(String awsAccessKey)
    {
        this.awsAccessKey = awsAccessKey;
    }

    public String getAwsSecretKey()
    {
        return awsSecretKey;
    }

    public void setAwsSecretKey(String awsSecretKey)
    {
        this.awsSecretKey = awsSecretKey;
    }

    public String getBucketName()
    {
        return bucketName;
    }

    public void setBucketName(String bucketName)
    {
        this.bucketName = bucketName;
    }

    public String getJarPrefix()
    {
        return jarPrefix;
    }

    public void setJarPrefix(String jarPrefix)
    {
        this.jarPrefix = jarPrefix;
    }

}
